package top.chenziji.Util;


public class VideoThumbnail {

    public static void cratePtoho(String inputVideoPath,String outputDir) throws Exception {
        String outputThumbnailPath = outputDir+"thumbnail.jpg";
        // 获取视频总时长
        double videoDuration = VideoUtils.getVideoDuration(inputVideoPath);
        System.out.println("Video Duration: " + videoDuration + " seconds");

        // 截取视频帧
        ScreenshotUtils.captureThumbnails(inputVideoPath, outputDir, videoDuration);

        // 合并图片为缩略图
        ThumbnailMerger.createThumbnail(outputThumbnailPath, outputDir);

        System.out.println("Thumbnail created successfully!");
    }
}
